-- GENERATED SPELL FOR [Vakkiz the Windrager] --


function spell0_23162(pUnit, Event) --@Bone Spray,n/a--
pUnit:FullCastSpellOnTarget(40419,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23162', 15257, 1)
end

function spell1_23162(pUnit, Event) --@Lightning Breath,n/a--
pUnit:FullCastSpellOnTarget(40420,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_23162', 506, 1)
end

function Sorts_23162(pUnit, Event)
local choix_sorts_23162 = math.random(0, 1)
if choix_sorts_23162 == 0 then
pUnit:RegisterEvent('spell0_23162', 1, 1)
end
if choix_sorts_23162 == 1 then
pUnit:RegisterEvent('spell1_23162', 1, 1)
end
end

function mob23162_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_23162', math.random(1500, 3000), 1)
end

function mob23162_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23162_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob23162_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(23162, 1, 'mob23162_Action')
RegisterUnitEvent(23162, 2, 'mob23162_Leave')
RegisterUnitEvent(23162, 3, 'mob23162_Kill')
RegisterUnitEvent(23162, 4, 'mob23162_Die')
